//-----------------------------------------------------------------------------
// File: MousePoint.cs
//
// Copyright (c) Dmitry Shuklin. All rights reserved.
//-----------------------------------------------------------------------------
using System;

namespace ObjectiveDraw.Platform.DrawerShapes
{
	/// <summary>
	/// Summary description for MousePoint.
	/// </summary>
	public class MousePoint : System.ICloneable//, ObjectiveDraw.Platform.IDrawerComponent
	{
		public const string SystemComponentId = "ObjectiveDraw.DrawerShapes.MousePoint";

		protected float m_Abscissa;
		protected float m_Ordinate;

		public MousePoint Original;

		/*protected int m_Ordinal;
		[ObjectiveDraw.Platform.Serialization.SerializableProperty(ObjectiveDraw.Platform.KnownDrawerVariables.ShapeControlPointOrdinal)]
		public int Ordinal
		{
			get
			{
				return this.m_Ordinal;
			}
			set
			{
				this.m_Ordinal = value;
			}
		}*/
		
		//[ObjectiveDraw.Platform.Serialization.SerializableProperty(ObjectiveDraw.Platform.KnownDrawerVariables.ShapeControlPointDateTime)]
		public float Abscissa
		{
			get
			{
				return this.m_Abscissa;
			}
			set
			{
				this.m_Abscissa = value;
			}
		}


		//[ObjectiveDraw.Platform.Serialization.SerializableProperty(ObjectiveDraw.Platform.KnownDrawerVariables.ShapeControlPointOrdinate)]
		public float Ordinate
		{
			get
			{
				return this.m_Ordinate;
			}
			set
			{
				this.m_Ordinate = value;
			}
		}

		#region ICloneable Members

		public object Clone()
		{
			MousePoint mp = (MousePoint)this.MemberwiseClone();
			return mp;
		}

		#endregion

		/*#region IDrawerComponent Members

		protected Cerebrum.ObjectHandle m_ObjectHandle = Cerebrum.ObjectHandle.Null;

		public Cerebrum.ObjectHandle ObjectHandle
		{
			get
			{
				return this.m_ObjectHandle;
			}
			set
			{
				this.m_ObjectHandle = value;
			}
		}

		protected string m_TypeName;
		public string TypeName
		{
			get
			{
				return this.m_TypeName;
			}
			set
			{
				this.m_TypeName = value;
			}
		}

		protected ObjectiveDraw.Platform.IDrawerComponent m_OwnerComponent;
		public ObjectiveDraw.Platform.IDrawerComponent OwnerComponent
		{
			get
			{
				return this.m_OwnerComponent;
			}
			set
			{
				this.m_OwnerComponent = value;
			}
		}

		public void Serialize(ObjectiveDraw.Platform.Serialization.FallbackChain storage, SerializationContext context)
		{
			Cerebrum.SerializeDirection direction = context.Direction;
			Cerebrum.Integrator.DomainContext c = this.DomainContext;

			if(Cerebrum.SerializeDirection.Save==direction)
			{
				ObjectiveDraw.Platform.Serialization.TypeSerializer.Serialize(storage, this);
			}

			if(Cerebrum.SerializeDirection.Init==direction)
			{
				this.m_OwnerComponent = context.OwnerComponent;
				//--this.InitVariables();
			}

			if(Cerebrum.SerializeDirection.Load==direction)
			{
				this.m_OwnerComponent = context.OwnerComponent;
				//--this.InitVariables();
				ObjectiveDraw.Platform.Serialization.TypeSerializer.Deserialize(storage, this);
			}
		}

		#endregion*/
	}
}
